package com.google.gwt.it2tool.client.widget;

import java.util.ArrayList;
import java.util.HashMap;

import com.google.gwt.it2tool.client.Factory;
import com.google.gwt.it2tool.client.Recipe;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.VerticalPanel;

public class FactoryDetailsPopupPanel extends PopupPanel {
	
	private VerticalPanel main = new VerticalPanel();
	
	private RessourceNeedsFlexTable ressourceNeeds = new RessourceNeedsFlexTable();
	
	public FactoryDetailsPopupPanel(Factory factory, HashMap<String,Recipe> recipes, int massProdLvl){
		super();
		setAnimationEnabled(true);
		setGlassEnabled(true);
		setAutoHideEnabled(true);
		setAutoHideOnHistoryEventsEnabled(true);
		
		Label title = new Label("Details für: "+factory.getName());
		title.addStyleName("factoryDetailsTitle");
		ArrayList<Factory> list =  new ArrayList<Factory>();
		list.add(factory);
		ressourceNeeds.setData(list);
		
		
		//main.add(title);
		main.add(ressourceNeeds);
		add(main);
	}

}
